﻿// See https://aka.ms/new-console-template for more information
using Emit.Study;
using System.Reflection;
using System.Reflection.Emit;


{
    ExecuteInterface executeInterface = new HelloWordDemo();
    executeInterface.Execute();
}
{
    ProxyDemo proxyDemo = new ProxyDemo();
    proxyDemo.Execute();

 
}
{
    //var proxy = ProxyBuilder.CreateProxy<IExampleInterface>((methodInfo, next) =>
    //{
    //    Console.WriteLine($"Before calling {methodInfo.Name}");
    //    next("the target object", null); // 假设target是实现了接口的对象
    //    Console.WriteLine($"After calling {methodInfo.Name}");
    //});

    //// 使用代理类
    //proxy.DoSomething();

}
